import request from '@/utils/request'

// 查询派工单管理列表
export function listDispatch(query) {
  return request({
    url: '/mes/mes/dispatch/list',
    method: 'get',
    params: query
  })
}

// 查询派工单管理详细
export function getDispatch(dispatchUuid) {
  return request({
    url: '/mes/mes/dispatch/' + dispatchUuid,
    method: 'get'
  })
}

// 新增派工单管理
export function addDispatch(data) {
  return request({
    url: '/mes/mes/dispatch',
    method: 'post',
    data: data
  })
}

// 修改派工单管理
export function updateDispatch(data) {
  return request({
    url: '/mes/mes/dispatch',
    method: 'put',
    data: data
  })
}

// 删除派工单管理
export function delDispatch(dispatchUuid) {
  return request({
    url: '/mes/mes/dispatch/' + dispatchUuid,
    method: 'delete'
  })
}
